package com.bdq.basic.infrastructure.persistence.mysql.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bdq.basic.infrastructure.persistence.mysql.pojo.BaseConfig;
import com.bdq.basic.infrastructure.persistence.mysql.service.BaseConfigService;
import com.bdq.basic.infrastructure.persistence.mysql.mapper.BaseConfigMapper;
import com.bdq.common.enums.EnableEnum;
import com.bdq.common.enums.YesOrNoEnum;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author malei
* @description 针对表【base_dict(基础字典表)】的数据库操作Service实现
* @createDate 2024-05-02 17:10:00
*/
@Service
public class BaseDictServiceImpl extends ServiceImpl<BaseConfigMapper, BaseConfig>
    implements BaseConfigService {

    @Override
    public List<BaseConfig> listAllEnable() {
        return lambdaQuery()
                .eq(BaseConfig::getStatus, EnableEnum.ENABLE.getCode())
                .eq(BaseConfig::getIsDeleted, YesOrNoEnum.NO.getCode())
                .list();
    }
}




